<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.carebuddy.petcare.controller.*"%>
<%@ page import="com.carebuddy.petcare.biz.*"%>
<%@ page import="com.db.vo.*"%>
<%@ page import="java.util.*"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	Carebuddy carebuddy = new Carebuddy();
	PetcareController petcareController = carebuddy.getPetcareController();
	UserController userController = carebuddy.getUserController();
	
	userController.getCookie(request, response);
	petcareController.searchPetcare_detail(request, response);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="../../css/style.css" rel="stylesheet" type="text/css">
<title>마이페이지</title>
</head>
<script language="javascript">
	function gogo(c,i){
		if(i=='1'){
			location.href='wt_mod.jsp?apply_id='+c;
		}else{
			 location.href='myconf_proc.jsp?apply_id='+c+'&stat='+i;
		}
	}
</script>
<body class="bodystyle">
	<form action=st_a.jsp name="proc_frm" method="post">
	<input type="hidden" name="user_id" value="${user_id}">
	<input type="hidden" name="apply_id" value="${details.getApply_id()}">
	<table width="650" align="center">
	  <tr>
	    <td><center><img src="../../images/apply.jpg"></center></td>
      </tr>
	  <tr>
	    <td>
	    	<table>
		      <tr>
		        <td>위탁희망일 :</td>
		        <td>${details.getDate()}</td>
		        <td>상태확인일 :</td>
		        <td>${details.getTdate()}</td>
	          </tr>
	        </table>
         	<table>
		    	<tr>
			      <td>반려동물 정보</td>
		        </tr>
			    <tr>
			      <td>분류 :</td>
			      <td>${details.getCategory()}</td>
			      <td>종 :</td>
			      <td>${details.getKind()}</td>
		        </tr>
		        <tr>
			      <td>이름 :</td>
			      <td>${details.getPname()}</td>
			      <td>몸무게 :</td>
			      <td>${details.getWeight()}</td>
		        </tr>
		        <tr>
			      <td>나이 :</td>
			      <td>${details.getAge()}</td>
			      <td>성별 :</td>
			      <td>${details.getMf()}</td>
		        </tr>
		        <tr>
			      <td>중성화여부 :</td>
			      <td>${details.getJsh()}</td>
			      <td>털 상태 :</td>
			      <td>${details.getFur()}</td>
		        </tr>
         	 </table>
	          <table>
	          	<tr>
		       	  <td>병력사항</td>
	          	</tr>
		      	<tr>
			      <td>예방접종 :</td>
			      <td>${details.getYbjj()}</td>
		        </tr>
		        <tr>
			      <td>치료경력 :</td>
			      <td>${details.getCrgr()}</td>
		        </tr>
		        <tr>
			      <td>복용중인 약 :</td>
			      <td>${details.getMedicine()}</td>
		        </tr>
		        <tr>
		       	  <td>특이사항</td>
	          	</tr>
	          	<tr>
			      <td>낯선사람에 대한 경계 :</td>
			      <td>${details.getAlert()}</td>
		        </tr>
		        <tr>
			      <td>${ws} 전화번호 :</td>
			      <td>${phone}</td>
			      <td>진행상태 :</td>
			      <td>${details.getSitu()}</td>
		        </tr>
	        </table>
      </tr>
	  <tr>
	  <c:if test="${ws == '수탁자'}">
	  	<c:choose>
		  	<c:when test="${details.getSitu()=='미신청'}">
		  		<td align="center">
			  	<input type="button" class="buttonstyle" value="내용 수정" onclick="gogo(${details.getApply_id()},1);"/>
			  	<input type="button" class="buttonstyle" value="신청 취소" onclick="gogo(${details.getApply_id()},2);"/></td>
		  	</c:when>
		  	<c:when test="${details.getSitu()=='수탁자 선정중'}">
			  	<td align="center">
			  	<input type="button" class="buttonstyle" value="수탁자 선정" onclick="gogo(${details.getApply_id()},3);"/>
			  	<input type="button" class="buttonstyle" value="신청 취소" onclick="gogo(${details.getApply_id()},2);"/></td>
		  	</c:when>
	  	</c:choose>
	  </c:if>
	  </tr>
	  </table>
	</form>
	<br><br><br>
</body>
</html>